#include "junix.h"
using namespace std;

void f() {
	cout<<"::f()\n";
}

template<typename Type>
struct A {
	void operator()() {
		f();
	}
};


template<typename Type>
struct B {
	void operator()() {
		f();
	}

	void f() {
		cout<<"B::f()\n";
	}
};

template <typename T>
struct C:public B<T> {
	void g() {
		f();//use ::f()
		this->f(); // B::f()
		B<T>::f(); // B::f()
	}
};

int main(int argc, char **argv)
{
	A<int>()();
	B<int>()();
	C<int>().g();
}
